package com.sg.dto.biz.bff.common;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;

/**
 * @desc BffTargetContentDto
 * @使用场景
 */
@Data
public class BffTargetContentDto implements Serializable {

    /**
     * 内容表主键ID
     */
    @NotNull(message = "内容表主键ID不能为空")
    @ApiModelProperty("内容表主键ID")
    private String entityId;

    /**
     * 排序
     */
    @ApiModelProperty("排序")
    private Long orderNumber;

    /**
     * 部门排序
     */
    @ApiModelProperty("部门排序")
    private Long dutyBodyOrderNum;

    /**
     * 个人排序
     */
    @ApiModelProperty("个人排序")
    private Long personalOrderNumber;

    /**
     * 权重排序
     */
    @ApiModelProperty("权重排序")
    private Long weightOrderNumber;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        BffTargetContentDto that = (BffTargetContentDto) o;
        return entityId == that.entityId && orderNumber == that.orderNumber && dutyBodyOrderNum == that.dutyBodyOrderNum && personalOrderNumber == that.personalOrderNumber && weightOrderNumber == that.weightOrderNumber;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), entityId, orderNumber, dutyBodyOrderNum, personalOrderNumber, weightOrderNumber);
    }

}
